<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>查看课程表</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
<button onclick="search()">查看课程表</button>
<div>
    <table>
        <tr class="monday"></tr>
        <tr class="one"></tr>
        <tr class="two"></tr>
        <tr class="three"></tr>
        <tr class="four"></tr>
        <tr class="five"></tr>
        <tr class="six"></tr>
        <tr class="seven"></tr>
        <tr class="eight"></tr>
    </table>
</div>


<script>
    function  search(){
        $.ajax({
            type:'get',
            url:'findAllCourses',
            success:function(data) {
                console.log(data[0].day);
                $(".monday").text(data[0].day);
                $(".one").text(data[0].one);
                $(".two").text(data[0].two);
                $(".three").text(data[0].three);
                $(".four").text(data[0].four);
                $(".five").text(data[0].five);
                $(".six").text(data[0].six);
                $(".seven").text(data[0].seven);
                $(".eight").text(data[0].eight);


            }
        });
    }
</script>
</body>
</html>
